{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/css/order.css" media="all">
<style>
    .layui-form-item {
        margin-top: 10px !important;
    }

    .layui-form-item {
        margin-bottom: 10px !important;
    }
</style>
<body>
<form action="{:url('save')}" class="layui-form" lay-filter="builderForm" data-token="{$builderTableToken}" data-nav="{$navTitle}" data-just="{$just}">
    <input type="hidden" name="id" value="{$info.id}">
    <input type="hidden" name="code" value="{$info.code}">
    <div class="layui-fluid layui-anim layui-anim-downbit" style="padding: 8px 0 !important;">
        <div class="order_box">
            <div class="head">
                <div class="full" style="align-items: center">
                    <img style="width: 60px;" src="{$info.photo}"/>
                    <div class="text">
                        <div class="title">{$info.nickname}</div>
                        <div>注册时间：{$info.create_time}</div>
                        <div style="margin-top: 5px">激活时间：{$info.active_time?:'未激活'}</div>
                    </div>
                    <div>
                        <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"
                                lay-filter="builderFormSubmit" lay-submit>保存
                        </button>
                    </div>
                </div>
            </div>
            <div class="layui-tab " lay-filter="user-info">
                <ul class="layui-tab-title">
                    <li class="layui-this">会员信息</li>
                    <li>实名认证</li>
                    <li>收款方式</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <div class="tabs-tab-pane">
                            <div class="section">
                                <div class="title">基本信息</div>
                                <div class="layui-row" style="padding-top: 10px">
                                    {:builderFormInit([
                                        'title' => '会员编号',
                                        'name' => 'code',
                                        'value' => $info.code
                                    ])->getFormItemInputHtml('', '', true)}

                                    {:builderFormInit([
                                        'title' => '昵称',
                                        'name' => 'nickname',
                                        'value' => $info.nickname,
                                        'req'=> true
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '手机号',
                                        'name' => 'mobile',
                                        'value' => $info.mobile,
                                        'req'=> true
                                    ])->getFormItemInputHtml('number')}

                                    {if $info.is_active == 2}
                                    <?php echo builderFormInit([
                                        'title' => '会员等级',
                                        'name' => 'level_id',
                                        'options' => array_merge([0 => '暂无'], \app\common\model\Level::column('title', 'id')),
                                        'value' => $info->level_id
                                    ])->getFormItemSelectHtml('level_id');?>
                                    {/if}
                                </div>
                            </div>
                        </div>
                        <div class="tabs-tab-pane">
                            <div class="section">
                                <div class="title">会员设置</div>
                                <div class="layui-row" style="padding-top: 10px">
                                    {:builderFormInit([
                                        'title' => '账号锁定',
                                        'name' => 'is_lock',
                                        'options' => [0 => '正常', 1 => '锁定'],
                                        'value' => $info.is_lock,
                                        'remark' => '开启后，此会员将无法登录系统'
                                    ])->getFormItemCheckboxHtml('radio')}
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="tabs-tab-pane">
                            <div class="section">
                                <div class="layui-row" style="padding-top: 10px">
                                    {:builderFormInit([
                                        'title' => '真实姓名',
                                        'name' => 'real_name',
                                        'value' => $info.real_name
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '身份证号',
                                        'name' => 'id_card',
                                        'value' => $info.id_card
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '身份证正面图',
                                        'name' => 'img_front',
                                        'value' => $info.img_front
                                    ])->getFormItemImgHtml(1)}

                                    {:builderFormInit([
                                        'title' => '身份证反面图',
                                        'name' => 'img_back',
                                        'value' => $info.img_back
                                    ])->getFormItemImgHtml(1)}
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="tabs-tab-pane">
                            <div class="section">
                                <div class="layui-row" style="padding-top: 10px">
                                    <?php echo builderFormInit([
                                        'title' => '银行名称',
                                        'name' => 'bank_name',
                                        'options' => array_merge([''=>'请选择'], \app\common\model\Bank::column('title','title')),
                                        'value' => $info->bank_name
                                    ])->getFormItemSelectHtml('bank_name');?>

                                    {:builderFormInit([
                                        'title' => '开户姓名',
                                        'name' => 'bank_open_name',
                                        'value' => $info.bank_open_name
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '银行卡号',
                                        'name' => 'bank_number',
                                        'value' => $info.bank_number
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '开户行地址',
                                        'name' => 'bank_address',
                                        'value' => $info.bank_address
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '微信真实姓名',
                                        'name' => 'wechat_name',
                                        'value' => $info.wechat_name
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '微信收款码',
                                        'name' => 'wechat_image',
                                        'value' => $info.wechat_image
                                    ])->getFormItemImgHtml(1)}

                                    {:builderFormInit([
                                        'title' => '支付宝真实姓名',
                                        'name' => 'alipay_name',
                                        'value' => $info.alipay_name
                                    ])->getFormItemInputHtml()}

                                    {:builderFormInit([
                                        'title' => '支付宝收款码',
                                        'name' => 'alipay_image',
                                        'value' => $info.alipay_image
                                    ])->getFormItemImgHtml(1)}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
</body>
{include file="public/footer" /}
<script>
    layui.use(['edit'], function () {
        layui.edit.render();
    });
</script>
</html>